<?php
	include "../../public/commom/config.php";
	include "../lock1.php";	
	
	$name = "";
	$id = 0;
	if($_GET) {
		$id = $_GET["id"];
		
		$sql = "SELECT * FROM class where id = $id";
		
		$result = mysqli_query($conn, $sql);
		
		while($row = mysqli_fetch_array($result)) {
			$name = $row["name"];
		}
		
		mysqli_close($conn);
	}
?>

<!DOCTYPE html>
<html>
	
	<head>
		<meta charset="utf-8" />
		<title></title>
		<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/css/bootstrap.min.css">
		<link rel="stylesheet" type="text/css" href="../public/css/index.css"/>
	</head>
	
	<body>
		<div class="container">
			<h1>修改分类</h1>
			<form class="form-inline" action="xiugai1.php" method="post">
				<label>
					分类名称：
					<input type="text" class="form-control" name="name" placeholder="请输入分类名称.." value="<?php echo $name?>" autocomplete="off" />
				</label>
				<input type="hidden" id="" name="id" value="<?php echo $id?>" />
				<input type="submit" class="btn btn-primary" value="修改"/>
			</form>
		</div>
	</body>
	
</html>